package com.longcai.cm.pay.wx.domain;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;

/**
 * @author libingxing
 */
@Data
public class WxOrderParam {

    @ApiModelProperty("订单编号")
    String orderNum;

    @ApiModelProperty("附加数据")
    String attach;

    @ApiModelProperty("openId")
    String openId;

    @ApiModelProperty("订单金额")
    BigDecimal amount;

    @ApiModelProperty("商品描述")
    String description;

    @ApiModelProperty("回调地址")
    String notifyUrl;

    public Integer getAmount() {
        return amount.multiply(new BigDecimal("100")).intValue();
    }

    public BigDecimal setAmount(Double value) {
        return amount = new BigDecimal(value + "");
    }
}
